<?php
function hidepopup($prefix) {
	$xml_code="<".$prefix."_cont><d>none</d></".$prefix."_cont>";
	$xml_code.="<".$prefix."_title><i><![CDATA[ ]]></i></".$prefix."_title>";
	$xml_code.="<".$prefix."_int><i><![CDATA[ ]]></i></".$prefix."_int>";	
	return $xml_code;
}
function timepopup($prefix,$content="") {
	$xml_code="";
	$xml_code.="<".$prefix."><mc>c</mc><d>block</d><i><![CDATA[$content]]></i></".$prefix.">";
	$run_code="<run><![CDATA[setTimeout('closediv(\'$prefix\')',1000)]]></run>";
	return array("item"=>$xml_code,"run"=>$run_code);
}
function showpopup3($prefix,$title,$content,$options=array()) {
	$position="center"; // left // right // under
	$refer="_";  // id dell elemento che fa da riferimento per la posizione
	$tipo="modal"; // modal // free ( senza l'ombra)
	extract($options);
	if($prefix!=""){
		$prefix=" id=\"$prefix\" ";
	}
	$xml_code="<popup $prefix >";
	if($content!="") {
		$xml_code.="<content><![CDATA[$content]]></content>";
	}
	$xml_code.="<title><![CDATA[$title]]></title>";
	$xml_code.="<position dove=\"$position\">$refer</position>";
	$xml_code.="<type>$tipo</type>";
	$xml_code.="</popup>";
	return $xml_code;
}
?>